// test_opencv.cpp
#include <opencv2/opencv.hpp>
#include <iostream>

//测试： g++ -std=c++17 test_opencv.cpp `pkg-config --cflags --libs opencv4` -o test_opencv ./test_opencv
int main() {
    std::cout << "OpenCV version: " << CV_VERSION << std::endl;

    // 创建一个简单的图像
    cv::Mat image = cv::Mat::zeros(300, 300, CV_8UC3);

    if (!image.empty()) {
        std::cout << "OpenCV working correctly!" << std::endl;
        return 0;
    } else {
        std::cout << "OpenCV installation issue!" << std::endl;
        return -1;
    }
}